package com.dms.dao.impl;

import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.dms.dao.AdminDao;
import com.dms.model.Admin;

@Repository
public class AdminDaoImpl extends BaseDaoImpl implements AdminDao {

	@Override
	public Admin getAdmin(String hql) {	
		return (Admin) getSession().createQuery(hql).uniqueResult();
	}

	@Override
	public void updateAdmin(Admin admin) {
		Session session=this.getSession();
		session.merge(admin);
		session.flush();
	}

	

}
